package com.xxx.pojo;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/15 9:40
 * @Copyright 博为峰
 */
public abstract class Account {
    private String cardNo;
    private String password;
    private double balance;

    public Account() {
    }

    public Account(String cardNo, String password, double balance) {
        this.cardNo = cardNo;
        this.password = password;
        this.balance = balance;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void save(int money) {
        this.balance += money;
    }

    public abstract void deposit(double money);
}
